<template>
  <div class="module-menu">
    <router-link 
      v-for="item in items" 
      :key="item.id" 
      :to="item.path || '#'" 
      class="menu-button"
    >
      <div class="menu-icon" :class="item.bgColor">
        <i :class="item.icon"></i>
      </div>
      <div class="menu-name">{{ item.name }}</div>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'ModuleMenu',
  props: {
    items: {
      type: Array,
      required: true
    }
  }
}
</script>

<style scoped>
.module-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background-color: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.menu-icon i {
  color: #fff;
  font-size: 18px;
}

.menu-name {
  font-size: 12px;
  text-align: center;
}
</style> 